{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 范例：随机漫步\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "% matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "nsteps = 1000\n",
    "draws = np.random.randint(0, 2, size=nsteps) # 取值范围[0, 2)\n",
    "steps = np.where(draws > 0, 1, -1)\n",
    "walk = steps.cumsum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x179b3e0ed30>]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXd4HOW1/7/vale7knYl2Zbci2xsjI1xwcKY4phimg1x\nCBDCTQjkXgKphB+5N5eSBEKaKQGSkBAgtCQEyA2Eaoptiik2xsYGV1zlpmK5SbuStr+/P3be2Xdm\nZ/ts1fk8jx/vzk55Z3b1nTPnnPccxjkHQRAEUT5YCj0AgiAIwlxI2AmCIMoMEnaCIIgyg4SdIAii\nzCBhJwiCKDNI2AmCIMoMEnaCIIgyg4SdIAiizCBhJwiCKDOshThoQ0MDb2pqKsShCYIgSpY1a9Yc\n5Jw3JluvIMLe1NSE1atXF+LQBEEQJQtjbHcq65ErhiAIoswgYScIgigzSNgJgiDKDBJ2giCIMoOE\nnSAIoswgYScIgigzSNgJgiDKDBJ2giCIPNDe5cVv3/wcOzs9OT8WCTtBEEQe2HukF394aztaj3pz\nfiwSdoIgiDzg9gYAAE5H7if8k7ATBEHkAbc3CABw2knYCYIg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IGEnCIIoM0jYCYIgygwSdoIgiDKDhJ0gCKLM+P9wxYTl\nQbbKqQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x179b1d3ea90>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(walk)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-8\n",
      "28\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "137"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print(walk.min())\n",
    "print(walk.max())\n",
    "(np.abs(walk) >= 10).argmax() # 看下第几部走到最远位置，无论正负。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 一次模拟多个随机漫步"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "106\n",
      "-49\n"
     ]
    }
   ],
   "source": [
    "nwalks = 5 # 同时模拟5个\n",
    "nsteps = 1000\n",
    "draws = np.random.randint(0, 2, size=(nwalks, nsteps))\n",
    "steps = np.where(draws > 0, 1, -1)\n",
    "walks = steps.cumsum(1) # 沿着行的方向做累加\n",
    "print(walks.max())\n",
    "print(walks.min())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([ True,  True,  True, False,  True], dtype=bool)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hits30 = (np.abs(walks) >= 30).any(1) # 看看有哪几路最远距离超过30\n",
    "print(hits30.sum())\n",
    "hits30"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([413, 379, 805, 671], dtype=int64)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "crossing_times = (np.abs(walks[hits30]) >= 30).argmax(1) # 最大距离超过30的穿越时间\n",
    "crossing_times"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "steps = np.random.normal(loc=0,\n",
    "                         scale=0.25,\n",
    "                         size=(nwalks, nsteps)) # 可以尝试用正态分布的方法生成数据"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
